package jiggle;

public class LinearSpringLaw extends SpringLaw {

	public LinearSpringLaw (Graph g, double k) {super (g, k);}

	@Override
    public double pairwiseWeights (double pref, double curr) {
		double r = pref  - preferredEdgeLength;
		if (r == 0) return 1; else return 1 - r / curr;
	}
}
